<script>
import { defineComponent } from "vue";
import {pageHandler} from '@/mixins/pageHandler'
import RightClickmenuList from "@/components/rightClickmenuList/rightClickMenuList.vue";
import YaokongDialog from "@/components/rightClickmenuList/yaokongDialog.vue";
import GuapaiDialog from "@/components/rightClickmenuList/guapaiDialog.vue";
import ScaleBox from "@/components/ScaleBox/ScaleBox.vue";
import MonitorHeader from "@/components/MonitorHeader/MonitorHeader.vue";
import NetState from "@/components/controls/netState.vue";
import RectSvg from "@/components/controls/rect-svg.vue";
import ConnectLine from "@/components/controls/connect-line.vue";
import TwoCircle from "@/components/controls/twoCricle.vue";
import KongZhiBaShou from "@/components/controls/KongZhiBaShou.vue";
import GuangZiPai from "@/components/controls/GuangZiPai.vue";
import BiLeiQi from "@/components/controls/biLeiQi.vue";
import TerminalSvg from "@/components/controls/terminal-svg.vue";
import ShouCheSvg from "@/components/controls/shou-che-svg.vue";

export default defineComponent({
  name: "zhubian",
  components: {
      ShouCheSvg,
      TerminalSvg,
      BiLeiQi,
      GuangZiPai, KongZhiBaShou, TwoCircle, ConnectLine, RectSvg, NetState, MonitorHeader, ScaleBox, GuapaiDialog, YaokongDialog, RightClickmenuList },
  mixins: [pageHandler],
  data() {
    return {
      hardPlatenDataList: [],
      flexiblePlatenDataList: [],
      GZPDataList: [],
      netStateList: [],
      numList:[],
      bashouList:[],
    };
  },
  methods:{
    initData(e){
      const typeMap = {
        "压板": "hardPlatenDataList",
        "网络状态": "netStateList",
        "遥测":'numList',
        "操作把手":"bashouList",
          "光字牌":'GZPDataList',
      };

      for (const listName of Object.values(typeMap)) {
        this[listName] = [];
      }
      for (const [key, value] of Object.entries(e)) {
        for (const [type, listName] of Object.entries(typeMap)) {
          const filtered = value.filter(item => item.type === type);
          if (filtered.length > 0) {
            this[listName].push({ name: key, list: filtered });
          }
        }
      }
      this.numList=this.numList.filter(item=> item.name!=='yx'&&item.name!=='重要遥测')
      console.log(this.numList);
    }
  }
});
</script>

<template>
  <div class="breaker-graph" @click="cancelLeftClickMenu" @contextmenu.stop="cancelLeftClickMenu" v-if="pageData">
    <scale-box :width="2320">
      <MonitorHeader :title="$route.query.ftName" >
        <template v-slot:btns>
          <button @click="routerToMainPage">主接线图</button>
          <button @click="clearAll($route.query.ftName)">画面清闪</button>
          <button @click="operationRecords">操作记录</button>
        </template>
      </MonitorHeader>
      <main>
        <div>
            <div class="line-wrapper">
            <svg>
                <g>
                    <g>
                        <line x1="100" y1="35" x2="320" y2="35" stroke="rgb(240,65,85)" stroke-width="5"></line>
                        <line x1="40" y1="450" x2="260" y2="450" stroke="rgb(0,210,0)" stroke-width="5"></line>
                        <line x1="400" y1="35" x2="520" y2="35" stroke="rgb(255,255,0)" stroke-width="5"></line>
                        <text x="160" y="15" style="fill: rgb(255,255,255);font-size: 20px">110kV 母线</text>
                        <text x="80" y="430" style="fill: rgb(255,255,255);font-size: 20px">10kV 母线</text>
                        <text x="410" y="15" style="fill: rgb(255,255,255);font-size: 20px">35kV 母线</text>
                        <circle  cx="210" cy="35" r="5" style="fill:rgb(240,65,85);"></circle>
                        <circle  cx="460" cy="35" r="5" style="fill:rgb(255,255,0);"></circle>
                        <line x1="210" y1="35" x2="210" y2="65" stroke="rgb(240,65,85)" stroke-width="2"></line>
                        <connect-line
                                :state="Number(pageData['glg'][0].state_val)"
                                :stateDesc="pageData['glg'][0].state_desc"
                                :scale="0.8"
                                :rotate="-90"
                                :info="pageData['glg'][0]"
                                :translate-x="177"
                                :translate-y="102"
                                :text-translate-y="0"
                                :text-translate-x="-10"
                                @itemRightClick="itemRightClick"
                                :name="pageData['glg'][0].state_desc"></connect-line>
                        <g transform="scale(1) translate(-510,-317)">
                            <circle r="23" cx="720" cy="480" fill="none" stroke-width="2" stroke="rgb(240,65,85)"/>
                            <line x1="720" y1="424" x2="720" y2="480" style="stroke:rgb(240,65,85);stroke-width:2"/>
                            <line x1="680" y1="498" x2="753" y2="463" style="stroke:rgb(240,65,85);stroke-width:2"/>
                            <polyline points="745.21,470.70 753,463 742.67,463.98" fill="rgb(240,65,85)" stroke="rgb(240,65,85)" />
                            <line x1="720" y1="480" x2="740" y2="494" style="stroke:rgb(240,65,85);stroke-width:2"/>
                            <circle r="23" cx="700" cy="505" fill="none" stroke-width="2" stroke="rgb(255,255,0)"/>
                            <line x1="700" y1="505" x2="700" y2="490" style="stroke:rgb(255,255,0);stroke-width:2"/>
                            <line x1="700" y1="505" x2="690" y2="512" style="stroke:rgb(255,255,0);stroke-width:2"/>
                            <line x1="700" y1="505" x2="710" y2="512" style="stroke:rgb(255,255,0);stroke-width:2"/>
                            <circle r="23" cx="740" cy="505" fill="none" stroke-width="2" stroke="rgb(0,210,0)"/>
                            <polyline points="733,490,733,520,753,505,733,490" style="stroke:rgb(0,210,0);stroke-width:2"/>
                        </g>
                        <g transform="translate(-180,-212)">
                            <polyline points="391,375,500,375,500,388" style="stroke:rgb(240,65,85);stroke-width:2" fill="none"/>
                            <bi-lei-qi color="rgb(240,65,85)" :translate-x="560" :translate-y="246" :rotate="90"></bi-lei-qi>
                        </g>
                        <terminal-svg
                                :state="Number(pageData['dd'][0].state_val)"
                                :stateDesc="pageData['dd'][0].state_desc"
                                :name="pageData['dd'][0].state_desc"
                                :info="pageData['dd'][0]"
                                :scale=0.8
                                :translate-x="340"
                                @itemRightClick="itemRightClick"
                                :translate-y="229"
                                :text-translate-y="40"
                                :text-translate-x="40"
                                :rotate="180"
                        ></terminal-svg>
                        <line x1="460" y1="35" x2="460" y2="60" stroke="rgb(255,255,0)" stroke-width="2"></line>
                        <line x1="460" y1="100" x2="460" y2="160" stroke="rgb(255,255,0)" stroke-width="2"></line>
                        <rect-svg
                                :state="Number(pageData['dlq'][0].state_val)"
                                :stateDesc="pageData['dlq'][0].state_desc"
                                :rotate="90"
                                :translate-y="108"
                                :translate-x="501"
                                :info="pageData['dlq'][0]"
                                :text-translate-x="-60"
                                :text-translate-y="-4"
                                :scale="1"
                                @itemRightClick="itemRightClick"
                                :itemObj="{is_clear:pageData['dlq'][0].is_clear}"
                                :name="pageData['dlq'][0].state_desc"
                        ></rect-svg>

                        <connect-line
                                :state="Number(pageData['glg'][1].state_val)"
                                :stateDesc="pageData['glg'][1].state_desc"
                                :scale="0.8"
                                :rotate="-90"
                                :info="pageData['glg'][1]"
                                :translate-x="428"
                                :translate-y="96"
                                :text-translate-y="0"
                                :text-translate-x="-10"
                                @itemRightClick="itemRightClick"
                                :name="pageData['glg'][1].state_desc"></connect-line>
                        <connect-line
                                :state="Number(pageData['glg'][2].state_val)"
                                :stateDesc="pageData['glg'][2].state_desc"
                                :scale="0.8"
                                :rotate="-90"
                                :info="pageData['glg'][2]"
                                :translate-x="428"
                                :translate-y="197"
                                :text-translate-y="0"
                                :text-translate-x="-10"
                                @itemRightClick="itemRightClick"
                                :name="pageData['glg'][2].state_desc"></connect-line>
                        <polyline points="190,211,190,400,460,400,460,202" stroke="rgb(255,255,0)" stroke-width="2" fill="none"></polyline>
                        <polyline points="230,211,230,440,100,440,100,570,200,570,200,450" stroke="rgb(0,210,0)" stroke-width="2" fill="none"></polyline>
                        <circle cx="200" cy="450" r="5" fill="rgb(0,210,0)" stroke-width="2" stroke="rgb(0,210,0)"></circle>
                        <shou-che-svg
                                :shou-che-data-obj="pageData['SC'][0]"
                                :rotate="90" :translate-x="140" :translate-y="495" :title-x="-25" :title-y="-10" :single="true"
                                :sc-gap="12"
                        ></shou-che-svg>
                        <shou-che-svg
                                :shou-che-data-obj="pageData['SC'][1]"
                                :rotate="90" :translate-x="240" :translate-y="505" :title-x="-25" :title-y="20" :single="true"
                                :name="pageData['SC'][1].state_desc"
                        ></shou-che-svg>
                        <rect-svg
                                :state="Number(pageData['dlq'][1].state_val)"
                                :stateDesc="pageData['dlq'][1].state_desc"
                                :rotate="90"
                                :translate-y="493"
                                :translate-x="141"
                                :info="pageData['dlq'][1]"
                                :text-translate-x="-60"
                                :text-translate-y="-4"
                                :scale="1"
                                @itemRightClick="itemRightClick"
                                :itemObj="{is_clear:pageData['dlq'][0].is_clear}"
                                :name="pageData['dlq'][1].state_desc"
                        ></rect-svg>
                    </g>

                    <g transform="translate(120,350)">
                        <text x="265" y="150" style="fill: rgb(255,255,255);font-size: 20px">档位：</text>
                        <text x="335" y="150" style="fill: rgb(130, 205, 135);font-size: 20px">{{ Number(pageData['遥测'].filter(item=>item.state_desc==='档位')[0].state_val) }}</text>
                        <text x="265" y="175" style="fill: rgb(255,255,255);font-size: 20px">油温1：</text>
                        <text x="335" y="175" style="fill: rgb(130, 205, 135);font-size: 20px">{{ Number(pageData['遥测'].filter(item=>item.state_desc==='油温1')[0].state_val).toFixed(2) }}</text>
                    </g>
                </g>

            </svg>
                <div class="control-handle-wrapper">
                    <div class="control-handle-grid">
                        <div v-for="(item, index) in this.pageData['操作把手']" :key="index" class="control-handle-grid-item">
                            <template v-if="item.isEmpty"></template>
                            <template v-else>
                                <div class="svg-wrapper">
                                    <svg>
                                        <g v-if="item.state_desc.includes('解锁')">
                                            <text x="20" y="15" fill="#FFFFFF" font-size="12px">联锁</text>
                                            <text x="60" y="60" fill="#FFFFFF" font-size="12px">解锁</text>
                                        </g>
                                        <g v-else>
                                            <text x="20" y="15" fill="#FFFFFF" font-size="12px">远方</text>
                                            <text x="60" y="60" fill="#FFFFFF" font-size="12px">就地</text>
                                        </g>
                                    </svg>
                                    <div class="polygon-icon">
                                        <div  class="cursor-pointer" style="cursor: pointer">
                                            <KongZhiBaShou style="margin-top: -10px" :info="item" :name="item.state_desc" :state="Number(item.state_val)"  @itemRightClick="itemRightClick" :deviceName="item.state_desc"  :jianGeMing="item.jg_name"></KongZhiBaShou>
                                        </div>
                                    </div>
                                </div>
                                <div class="grid-item-name">{{item.state_desc}}</div>
                            </template>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div>
                <div class="remote-measurement-wrapper" style="margin-top: 5rem">
                    <div style="text-align: center;font-size: 1.6rem;color: rgb(220, 214, 147);margin: 1rem 0">遥测量</div>
                    <div class="remote-measurement-table">
                        <table border="3" cellspacing="0" class="numTab">
                            <colgroup>
                                <col style="width: 20%;" />
                                <col style="width: 20%;" />
                                <col style="width: 20%;" />
                                <col style="width: 20%;" />
                            </colgroup>
                            <tbody>
                            <tr style="background-color: rgb(35,130,222)">
                                <td></td>
                                <td>{{numList[1].name}}</td>
                                <td>{{numList[2].name}}</td>
                                <td>单位</td>
                            </tr>
                            <tr  v-for="(item, index) in numList[1].list" :key="index"   :style="{ backgroundColor: index % 2 === 0 ? 'rgb(36, 104, 176)' : 'rgb(35, 130, 222)',height:'30px'}">
                                <td :style="{color: 'white'}">{{item.state_desc}}</td>
                                <td style="color: #3CFF1E;cursor: pointer;" @contextmenu.prevent.stop="checkVal(item,true)">{{Number(item.state_val).toFixed(2)}}</td>
                                <td style="color: #3CFF1E;cursor: pointer;" @contextmenu.prevent.stop="checkVal(numList[2].list[index],true)">{{Number(numList[2].list[index].state_val).toFixed(2)}}</td>
                                <td :style="{color: 'white'}">{{item.unit}}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
        </div>
        <div>
            <div class="netState">
                <div class="netInner">
                    <div class="netState_list" v-for="item in this.netStateList[0].list" >
                        <div class="netTitle">{{item.state_desc}}</div>
                        <net-state :info="item" :state="item.state_val"></net-state>
                    </div>
                </div>

            </div>
            <div class="gzpBox">
                <div class="gzpInner"  v-for="o in this.GZPDataList">
                    <div style="text-align: center;font-size: 1.6rem;color: rgb(220, 214, 147);margin: 1rem 0">{{o.name}}</div>
                    <div class="gzpItem">
                        <div v-for="item in o.list">
                            <GuangZiPai :set-hei="true" height="40" :info="item" :isClear="+item.is_clear" :jianGeMing="item.jg_name" :name="item.state_desc" :state="Number(item.state_val)"></GuangZiPai>
                        </div>
                    </div>
                </div>

            </div>
        </div>
      </main>
    </scale-box>
  <rightClickmenuList v-if="rightMenuObj&&showMenu" :rightMenuObj="rightMenuObj" @menuItemClick="menuItemClick"></rightClickmenuList>
  <el-dialog  custom-class="yaokongPersonDialog" :visible.sync="operatorPwdDialogVisible_0" width="22%" :close-on-click-modal="false">
    <p slot="title" class="el-dialog__title">操作人</p>
    <div class="operatorPwd">
      <div class="operator">
        <label>请输入操作人</label>
        <el-select size="small" v-model="operatorPwdObj.username" style="width: 16rem;">
          <el-option
            v-for="(item,index) in userInfoJson.operatorList"
            :key="index"
            :label="item.username"
            :value="item.username"
          ></el-option>
        </el-select>
      </div>
      <div class="pwd">
        <label>请输入密码</label>
        <el-input v-model="operatorPwdObj.pwd" size="small" type="password"   @keydown.enter.native="operatorPwdSubmit_0"></el-input>
      </div>
    </div>
    <span slot="footer" class="dialog-footer" >
				<el-button size="small" @click="operatorPwdSubmit_0">确 定</el-button>
				<el-button size="small" @click="operatorPwdDialogVisible_0 = false">取 消</el-button>
			</span>
  </el-dialog>
  <el-dialog  custom-class="yaokongPersonDialog" :visible.sync="operatorPwdDialogVisible" width="22%" :close-on-click-modal="false">
    <p slot="title" class="el-dialog__title">监护人</p>
    <div class="operatorPwd">
      <div class="operator">
        <label>请输入监护人</label>
        <el-select size="small" v-model="adminPwdObj.username" style="width: 16rem;">
          <el-option
            v-for="(item,index) in userInfoJson.adminList"
            :key="index"
            :label="item.username"
            :value="item.username"
          ></el-option>
        </el-select>

      </div>
      <div class="pwd">
        <label>请输入监护员密码</label>
        <el-input v-model="adminPwdObj.pwd" size="small" type="password" @keydown.enter.native="operatorPwdSubmit"></el-input>
      </div>
    </div>
    <span slot="footer" class="dialog-footer" >
				<el-button size="small" @click="operatorPwdSubmit">确 定</el-button>
				<el-button size="small" @click="operatorPwdDialogVisible = false">取 消</el-button>
			</span>
  </el-dialog>
  <el-dialog
    custom-class="switchPatrolDialog"
    :visible.sync="dialogVisible"
    :close-on-press-escape="true"
    :close-on-click-modal="true"
    :width="`40%`"
    :modal="false"
    @before-close="handleDialogClose"
  >

    <!-- 隔离刀 -->
    <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'gelidao'">

      <!-- 遥控 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
        <p slot="title" class="el-dialog__title">遥控</p>
        <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
      </template>

      <!-- 开关清闪 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 2">
        <p slot="title" class="el-dialog__title">开关清闪</p>
      </template>



      <!-- 挂牌/摘牌 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 6">
        <p slot="title" class="el-dialog__title">挂牌/摘牌</p>
        <guapaiDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></guapaiDialog>
      </template>

      <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value != 4" size="small" @click="dialogVisible = false">取 消</el-button>

        <!-- 遥控 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>
        <!-- 挂牌/摘牌 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 6" size="small" type="primary" @click="handleBrand">确 定</el-button>

				</span>
    </template>

    <!-- 地刀 -->
    <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'didao'">
      <!--          遥控-->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
        <p slot="title" class="el-dialog__title">遥控</p>
        <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
      </template>
      <!-- 开关清闪 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 0">
        <p slot="title" class="el-dialog__title">开关清闪</p>
        <span>暂无内容</span>
      </template>

      <!-- 全站清闪 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 4">
        <p slot="title" class="el-dialog__title">全站清闪</p>
        <span>暂无内容</span>
        <!-- <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></yaokongDialog> -->
      </template>
      <!-- 挂牌/摘牌 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 5">
        <p slot="title" class="el-dialog__title">挂牌/摘牌</p>
        <guapaiDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></guapaiDialog>
      </template>
      <span slot="footer" class="dialog-footer" >
            <!-- 遥控 按钮 -->					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 0" size="small" @click="dialogVisible = false">取 消</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>


        <!-- 挂牌/摘牌 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 5" size="small" type="primary" @click="handleBrand">确 定</el-button>
				</span>
    </template>

    <!-- 断路器 -->
    <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'duanluqi'">
      <!-- 遥控 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
        <p slot="title" class="el-dialog__title">遥控</p>
        <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
      </template>
      <!-- 开关清闪 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 2">
        <p slot="title" class="el-dialog__title">开关清闪</p>
        <span>确定要将{{currentSelectMenuItemObj.currentObj.name}}开关清闪吗？</span>
        <!-- <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></yaokongDialog> -->
      </template>
      <!-- 全站清闪 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 3">
        <p slot="title" class="el-dialog__title">全站清闪</p>
        <span>确定要将全部设备进行清闪吗？</span>
        <!-- <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></yaokongDialog> -->
      </template>

      <!-- 挂牌/摘牌 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 6">
        <p slot="title" class="el-dialog__title">挂牌/摘牌</p>
        <guapaiDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></guapaiDialog>
      </template>
      <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value != 4" size="small" @click="dialogVisible = false">取 消</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 2" size="small" @click="clearFlesh">确定</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 3" size="small" @click="clearAll">确定</el-button>
        <!-- 遥控 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>

        <!-- 挂牌/摘牌 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 6" size="small" type="primary" @click="handleBrand">确 定</el-button>
				</span>
    </template>

    <!-- 把手 -->
    <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'bashou'">
      <!-- 操作 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
        <p slot="title" class="el-dialog__title">操作</p>
        <span>暂无内容</span>
      </template>
      <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value != 2" size="small" @click="dialogVisible = false">取 消</el-button>

				</span>
    </template>



    <template v-if="currentSelectMenuItemObj&&currentSelectMenuItemObj.type=='ruanyaban'">
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
        <p slot="title" class="el-dialog__title">遥控</p>
        <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
      </template>
      <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 2" size="small" @click="dialogVisible = false">取 消</el-button>

        <!-- 遥控 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>
				</span>
    </template>




  </el-dialog>
  <el-dialog ref="operateRecordDialogRef" custom-class="operateRecordDialog" :modal="false" :close-on-click-modal="false" v-if="operationRecordsDialogVisible" :visible.sync="operationRecordsDialogVisible" v-dialogDrag:{dialogDrag}="true" width="35%">
    <p slot="title" class="el-dialog__title">操作记录</p>
    <div class="messageAlarmList">
      <el-table :data="operationRecordsData" width="100%" height="250" >
        <el-table-column prop="num" label="序号" width="85" header-align="center" align="center" >
          <template #default="{row}">
            <span :class="{'is-highlight': !!row.isHighlight}">{{row.num}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="createTime" label="操作时间" width="160" header-align="center" align="center" >
          <template #default="{row}">
            <span :class="{'is-highlight': !!row.isHighlight}">{{row.createTime}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="log_desc" label="操作描述" header-align="center" >
          <template #default="{row}">
            <span :class="{'is-highlight': !!row.isHighlight}">{{row.log_desc}}</span>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </el-dialog>
</div>
</template>

<style scoped lang="less">
@import "@/assets/css/public";
main {
  height: calc(100% - 90px);
  border: 1px solid white;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  color: #ffffff;
  & > div {
    height: 98%;
    border: 1px solid white;
    &:nth-of-type(1) {
      width: 30%;
    }
    &:nth-of-type(2) {
      width: 28%;
    }
    &:nth-of-type(3) {
      width: 40%;
    }
  }
}
.line-wrapper {
  border: 1px solid red;
  height: 700px;
  padding: 10px 0;
  box-sizing: border-box;
  svg {
    width: 100%;
    height: 100%;
  }
}
.numTab td{
  height: 2rem;
}
.control-handle-wrapper {
  padding: 10px;
  box-sizing: border-box;
  position: relative;
  width: 90%;
  margin: 2rem auto;
  display: flex;
  .control-handle-name {
    text-align: center;
    line-height: 30px;
    font-size: 20px;
    border-bottom: none;
    padding: 4px;
  }
  .control-handle-grid {
    width: 110%;
    display: flex;
    justify-content: space-evenly;
    .control-handle-grid-item {
      background-color: rgb(19, 52, 140);
      border: 1px solid #fff;
      height: 100px;
      text-align: center;
      padding: 0px;
      box-sizing: border-box;
      position: relative;
      .svg-wrapper {
        width: 100%;
        height: 70px;
        svg {
          width: 100%;
          height: 100%;
          position: absolute;
          left: 0;
        }
        .rotate {
          transform-origin: center;
        }
        .polygon-icon {
          position: absolute;
          left: 10px;
          top: 36px;
          width: 50px;
          height: 50px;
        }
      }
      .grid-item-name {
        margin-top: 10px;
        font-size: 13px;

      }
    }
  }
}
.netState{
  height: 10%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 3px solid #fff;
  .netInner{
    background-color: rgb(38, 86, 225);
    display: flex;
    flex-wrap: wrap;
    height: 90%;
    width: 90%;
    .netState_list{
      border: 1px solid #fff;
      width: 33%;
      display: flex;
      align-items: center;
      .netTitle{
        width: 150%;
        text-align: center;
        font-size: 1.4rem;
      }
    }
  }

}
.gzpBox{
  background-color: rgb(16, 48, 58);
  height: 90%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.gzpInner{
  height: 100%;
  padding: 10px;
  width: 30%;
  .gzpItem{
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    width: 100%;
    height: 80%;
    overflow-y: auto;
    .gzpTitle{
      font-size: 22px;
      color: rgba(153, 82, 61);
      text-align: center;
    }
  }
}
</style>
